<template>
  <div >
    <problem-detail :problem-model="problemModel"/>
  </div>
</template>

<script>
import ProblemDetail from "@/components/content/problemDetail/ProblemDetail";
import {getProblemDetail} from "@/network/problem";

export default {
  components: {ProblemDetail},
  data() {
    return {
      problemModel: {}
    }
  },
  mounted() {
    this.init();
  },
  methods: {
    init() {
      let problemId = this.$route.params.problemId;
      getProblemDetail(problemId).then(res => {
        this.problemModel = res.data;
      }).catch(_ => {
        console.log(_)
      })
    },
  }
};
</script>

<style lang="scss" scoped>

</style>
